/* 全局样式 */
:root {
    --primary-color: #ff6b6b;
    --secondary-color: #6b66ff;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --gray-color: #6c757d;
    --light-gray-color: #e9ecef;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --font-family: 'Nunito', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --spacing-xs: 5px;
    --spacing-sm: 10px;
    --spacing-md: 15px;
    --spacing-lg: 20px;
    --spacing-xl: 30px;
}

body {
    font-family: var(--font-family);
    background-color: #f9f9f9;
    color: #333;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 登录页样式 */
.login-page {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
}

.login-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 15px 30px var(--shadow-color);
    padding: 40px;
    width: 400px;
    max-width: 90%;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo h1 {
    color: var(--primary-color);
    font-size: 24px;
    margin: 0;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--dark-color);
}

.login-form .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
}

.login-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
    outline: none;
}

.login-form .btn-primary {
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.login-form .btn-primary:hover {
    background-color: #ff5252;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 250px;
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 5px var(--shadow-color);
    z-index: 1000;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.sidebar-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 20px;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: #f8f9fa;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 主内容区域样式 */
.main-content {
    margin-left: 250px;
    padding: 20px;
    flex: 1;
    transition: all 0.3s;
}

/* 顶部导航栏 */
.top-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color);
}

.hamburger-menu {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--dark-color);
}

.user-menu {
    display: flex;
    align-items: center;
}

.user-menu .dropdown {
    position: relative;
}

.user-menu .dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    border-radius: 5px;
    transition: all 0.3s;
}

.user-menu .dropdown-toggle:hover {
    background-color: var(--light-gray-color);
}

.user-menu .dropdown-toggle img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
}

.user-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 15px var(--shadow-color);
    padding: 10px 0;
    min-width: 180px;
    z-index: 1000;
    display: none;
}

.user-menu .dropdown-menu.show {
    display: block;
}

.user-menu .dropdown-menu a {
    display: block;
    padding: 8px 20px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s;
}

.user-menu .dropdown-menu a:hover {
    background-color: var(--light-gray-color);
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: 30px;
    overflow: hidden;
    border: none;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-color);
}

.card-body {
    padding: 25px;
}

/* 统计卡片 */
.stats-card {
    display: flex;
    align-items: center;
    padding: 20px;
}

.stats-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 15px;
    font-size: 24px;
    color: #fff;
}

.stats-icon.primary {
    background-color: var(--primary-color);
}

.stats-icon.secondary {
    background-color: var(--secondary-color);
}

.stats-icon.success {
    background-color: var(--success-color);
}

.stats-icon.info {
    background-color: var(--info-color);
}

.stats-info h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 700;
}

.stats-info p {
    margin: 0;
    color: var(--gray-color);
    font-size: 14px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 6px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
}

.table th, .table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
    white-space: nowrap;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table .actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table img {
    object-fit: cover;
    border-radius: 4px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    text-align: center;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #ff5252;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5652ff;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-light {
    background-color: var(--light-color);
    color: var(--dark-color);
    border: 1px solid var(--border-color);
}

.btn-light:hover {
    background-color: #e2e6ea;
}

/* 表单样式 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
    outline: none;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-left: 5px;
}

.form-check-input {
    margin-right: 10px;
}

.form-check-label {
    margin-bottom: 0;
}

/* 改进的栅格系统 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    box-sizing: border-box;
}

.row > [class*="col-"] {
    padding: 0 15px;
    margin-bottom: var(--spacing-lg);
    box-sizing: border-box;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

/* 输入组样式改进 */
.input-group {
    display: flex;
    width: 100%;
    margin-bottom: var(--spacing-md);
}

.input-group .form-control {
    flex: 1;
    border-radius: 6px 0 0 6px;
}

.input-group .form-control:not(:first-child) {
    border-radius: 0;
}

.input-group .form-control:not(:last-child) {
    border-right: 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--dark-color);
    text-align: center;
    white-space: nowrap;
    background-color: var(--light-gray-color);
    border: 1px solid var(--border-color);
}

.input-group > .input-group-text {
    border-radius: 0 6px 6px 0;
}

.input-group > .form-control:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* 搜索和过滤表单改进 */
.filter-form {
    background-color: #fff;
    border-radius: 8px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: 0 2px 5px var(--shadow-color);
}

.filter-form .form-group {
    margin-bottom: var(--spacing-md);
}

.filter-form .row {
    margin-bottom: 0;
}

.search-form {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.search-form .form-control {
    flex: 1;
    min-width: 200px;
}

.search-form .btn {
    white-space: nowrap;
}

/* 警告消息样式 */
.alert {
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    border-left-color: var(--success-color);
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-left-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-left-color: var(--warning-color);
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-left-color: var(--info-color);
    color: #0c5460;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.badge-primary {
    background-color: var(--primary-color);
    color: white;
}

.badge-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.badge-success {
    background-color: var(--success-color);
    color: white;
}

.badge-danger {
    background-color: var(--danger-color);
    color: white;
}

.badge-warning {
    background-color: var(--warning-color);
    color: #212529;
}

.badge-info {
    background-color: var(--info-color);
    color: white;
}

/* 分页样式 */
.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 20px 0;
    justify-content: center;
}

.pagination li {
    margin: 0 5px;
}

.pagination a {
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--dark-color);
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.pagination a:hover {
    background-color: var(--light-gray-color);
}

.pagination a.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 响应式设计优化 */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    .col-md-6, .col-md-4, .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .col-md-6, .col-md-4, .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .filter-form {
        padding: var(--spacing-md);
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-header .btn {
        margin-top: var(--spacing-sm);
        width: 100%;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-control,
    .input-group .input-group-text,
    .input-group > .form-control:not(:first-child),
    .input-group > .form-control:not(:last-child) {
        border-radius: 6px;
        margin-top: 5px;
    }
    
    .text-right {
        text-align: left !important;
    }
    
    .ml-2 {
        margin-left: 0 !important;
        margin-top: 10px !important;
    }
}

/* 辅助类 */
.mb-0 {
    margin-bottom: 0 !important;
}

.mb-2 {
    margin-bottom: 10px !important;
}

.ml-2 {
    margin-left: 10px !important;
}

.text-right {
    text-align: right !important;
}

/* 日期范围选择器样式 */
.date-range-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.small-label {
    font-size: 12px;
    color: var(--gray-color);
    margin-bottom: 5px;
    font-weight: normal;
}

/* 改进表单内部布局 */
input[type="date"].form-control {
    padding: 8px 12px;
    -webkit-appearance: none;
}

/* 表单操作区域 */
.form-actions {
    display: flex;
    padding: 20px 0 10px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 30px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 6px;
}

/* 标签容器样式 */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}

.tags-container .form-check {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    min-width: 150px;
}

.text-danger {
    color: var(--danger-color);
}

/* 小屏幕适配 */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .form-actions .ml-2 {
        margin-left: 0 !important;
    }
    
    .tags-container {
        flex-direction: column;
        gap: 10px;
    }
}

/* 文件上传样式 */
.custom-file-container {
    position: relative;
    margin-bottom: 0.5rem;
    display: block;
    width: 100%;
    height: 38px; /* 固定高度 */
    overflow: hidden;
}

.custom-file-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 20; /* 提高层级 */
    font-size: 100px; /* 增大文件输入框 */
}

.custom-file-label {
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px dashed var(--primary-color);
    border-radius: var(--input-border-radius);
    background-color: rgba(78, 115, 223, 0.05);
    font-size: 0.875rem;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.custom-file-label:hover {
    background-color: rgba(78, 115, 223, 0.1);
    border-color: var(--primary-hover);
    cursor: pointer;
}

.custom-file-label i {
    margin-right: 5px;
}

.form-control-file {
    display: block;
    width: 100%;
    cursor: pointer;
}

.img-preview {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 字段描述文本 */
.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 80%;
}

/* 信息卡片样式 */
.info-card {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.info-card-title {
    padding: 15px;
    margin: 0;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f8f9fa;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.info-card-body {
    padding: 15px;
}

/* 统计卡片样式 */
.stat-card {
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #fff;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card-body {
    padding: 20px;
    display: flex;
    align-items: center;
}

.stat-card-icon {
    font-size: 2.5rem;
    margin-right: 15px;
    opacity: 0.8;
}

.stat-card-info {
    flex: 1;
}

.stat-card-title {
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.8;
}

.stat-card-value {
    font-size: 24px;
    font-weight: 700;
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 7px;
    top: 5px;
    height: calc(100% - 10px);
    width: 2px;
    background-color: #e0e0e0;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    top: 5px;
    z-index: 1;
}

.timeline-content {
    position: relative;
    padding-bottom: 15px;
}

.timeline-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.timeline-date {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}

.timeline-note {
    margin: 5px 0 0;
    font-size: 14px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

/* 打印样式 */
@media print {
    .sidebar, .navbar, .card-header, .info-card:last-child, .card-tools, .btn {
        display: none !important;
    }
    
    body {
        padding: 0;
        margin: 0;
        background-color: #fff;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .card-body {
        padding: 0 !important;
    }
    
    .info-card {
        page-break-inside: avoid;
        border: 1px solid #ddd !important;
        margin-bottom: 15px !important;
    }
    
    .table {
        width: 100% !important;
        border-collapse: collapse !important;
    }
    
    .table th, .table td {
        border: 1px solid #ddd !important;
    }
}

/* 模态框样式 */
.modal-header {
    background-color: var(--primary-color);
    color: #fff;
    border-bottom: none;
}

.modal-header .close {
    color: #fff;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

.modal-footer {
    border-top: 1px solid #e0e0e0;
    background-color: #f8f9fa;
}

/* 加载动画 */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 表单布局优化 */
.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.form-row > .col,
.form-row > [class*="col-"] {
    padding-right: 10px;
    padding-left: 10px;
}

/* 优化表单中的标签和必填标记 */
label.required:after {
    content: " *";
    color: var(--danger-color);
}

/* 图片上传区域优化 */
.image-upload-container {
    border: 2px dashed #ddd;
    border-radius: 6px;
    padding: 15px;
    text-align: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
}

.image-upload-container:hover {
    border-color: var(--primary-color);
    background-color: #f0f8ff;
}

.image-upload-container .custom-file-label {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-container {
    padding: 10px;
    text-align: center;
    margin-top: 10px;
    background-color: #fff;
    border-radius: 4px;
}

.preview-container img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

/* 图片上传的垂直间距 */
.image-upload-section {
    margin-bottom: 20px;
}

/* 表单操作按钮区域 */
.form-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* 类别和状态选择区域 */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    margin: -5px;
    gap: 10px;
}

.checkbox-group .form-check {
    margin: 5px;
    min-width: 120px;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
    box-sizing: border-box;
    flex-grow: 0;
}

.checkbox-group .form-check:hover {
    background-color: #e9ecef;
}

.checkbox-group .form-check-input:checked + .form-check-label {
    font-weight: 600;
    color: var(--primary-color);
}

/* 价格输入优化 */
.price-input-group {
    position: relative;
}

.price-input-group .form-control {
    padding-right: 40px; /* 在右侧留出空间显示单位 */
}

.price-input-group:after {
    content: "亲亲";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    z-index: 5;
}

/* 描述文本框优化 */
textarea.form-control.description {
    min-height: 120px;
    line-height: 1.5;
}

/* 卡片内边距调整 */
.card-body.form-card-body {
    padding: 25px;
}

/* 表单组之间的间距 */
.form-group {
    margin-bottom: 1.8rem;
    position: relative;
}

/* 改进的按钮样式 */
.btn-save {
    padding: 10px 25px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.btn-save i {
    margin-right: 8px;
}

@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions .btn {
        margin: 5px 0;
        width: 100%;
    }
    
    .checkbox-group {
        flex-direction: column;
    }
    
    .checkbox-group .form-check {
        width: 100%;
        margin: 5px 0;
    }
    
    .preview-container img {
        max-height: 150px;
    }
}

/* 改进下拉列表显示 */
select.form-control {
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4'%3E%3Cpath fill='%23343a40' d='M0 0h8L4 4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 8px 4px;
    padding-right: 1.75rem;
}

/* 修复表单中标签的样式 */
.form-check-label {
    margin-left: 5px;
    font-weight: normal;
    display: inline-block;
}

/* 优化下拉框的显示 */
.form-control option {
    white-space: normal;
    padding: 8px;
}

/* 确保菜单和下拉项有足够的空间 */
.sidebar-menu a, .dropdown-menu a {
    padding: 12px 20px;
    white-space: normal;
    line-height: 1.4;
} 